package com.blb.zy_community.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.blb.zy_community.entity.ZyBuilding;
import com.blb.zy_community.entity.ZyRoom;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.blb.zy_community.entity.ZyUnit;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 房间  Mapper 接口
 * </p>
 *
 * @author 二组
 * @since 2023-06-18
 */
public interface ZyRoomMapper extends BaseMapper<ZyRoom> {

    Page<ZyRoom> selectRoomList(Page<ZyRoom> page, String unitId, String buildingId, String roomStatus,Long communityId);

    @Select("select * from zy_unit where building_id=#{buildingId}")
    List<ZyUnit> selectUnitAndBuildingChildren(Long buildingId);

    List<ZyBuilding> selectBuilding();

    void deleteByRoomIds(Long[] roomIds);

}
